package com.hsmw.api.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hsmw.api.vo.*;
import com.hsmw.domain.HsmwOrderBalance;
import com.hsmw.domain.HsmwVehicle;
import com.hsmw.domain.vo.VehicleInfoVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.hsmw.common.base.BaseMapper;

import java.util.HashMap;
import java.util.List;


/**
 * <p>
 * 车辆信息表 Mapper 接口
 * </p>
 *
 * @author WD
 * @since 2021-02-07
 */
@Repository
public interface HsmwVehicleMapper extends BaseMapper<HsmwVehicle> {


//	List<VehicleDataCollectDto> selectVehicleMonthOrderCount(DateTime startTime, DateTime endTime);

	List<HsmwVehicle> getDriverVehicleSelect();

	Page<VehicleDataCollectVO> selectVehicleMonthOrderCount(IPage page, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime, @Param("vehiclePlate") String vehiclePlate, @Param("vehicleModel") String vehicleModel);

	IPage<VehicleDataCollectVO> getVehicleDataCollect(IPage page, @Param("requestData") VehicleDataCollectVO requestData);

    public void updateMobileLocation(HashMap param);

    VehicleDetailInfo getVehicleDetailInfo(HashMap key);

    List<IdleVehicleVo> findVehicleList(@Param("queryFreeParams") QueryFreeParams queryFreeParams);

    List<DriverAndVehicleVO> findVehicleInfoList(String id);

    List<HsmwOrderBalance> findRelationOrderList(String id, String month,String driverVolume);

    List<RelationOrderVo> findRelationOrderListByVehicleId(String id,String month);

    List<HomeVolume> findVehicleVolumeByMonth(String id,String month);

    List<HomeVolume> findItemPerOnWeek(String id);

    List<HomeVolume> findItemPerOnMonth(String id,String month);

//	IPage<VehicleDataCollectVO> getVehicleDataCollect(IPage page, @Param("data") VehicleDataCollectVO vehicleDataCollectVO);
    String findArmSegments();

    String findArmAixs();

    List<VehicleInfoVO> queryAvaliableVehiclesInfo(HashMap param);

    List<HsmwVehicle> selectPlateformVehicles(HashMap param);

    List<HsmwVehicle> selectForemanPlateformVehicles(HashMap param);

    List<HsmwVehicle> checkIfPlateformVehicles(HashMap param);

}
